// 7-4 检查密码
#include <stdio.h>
#include <string.h>

#define is_num(ch) (ch >= '0' && ch <= '9')
#define is_letter(ch) ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))

int main()
{
    int n;
    scanf("%d", &n);
    getchar(); // 去除缓冲区遗留的换行符
    for (int xx=0; xx<n; xx++) {
        char s[82]; // 这里82，如果81就有不过的
        fgets(s, 82, stdin);
        // scanf("%s", s);
        int l = strlen(s);
        if (l>0 && s[l-1]=='\n') {
            s[l-1] = 0; // 去除末尾换行符
            l--;
        }
        // printf("(%s) ", s);
        if (l<6) {
            printf("Your password is tai duan le.\n");
            continue;
        }
        int have_num = 0, have_letter = 0, have_inval = 0;
        for (int i=0; i<l; i++) {
            if (s[i]!='.' && !is_letter(s[i]) && !is_num(s[i])) {
                have_inval = 1; // 含非法字符
                break;
            }
            if (is_num(s[i])) {
                have_num = 1;
            }
            if (is_letter(s[i])) {
                have_letter = 1;
            }
        }
        if (have_inval) {
            printf("Your password is tai luan le.\n");
            continue;
        }
        if (have_letter && have_num) {
            printf("Your password is wan mei.\n");
        } else {
            // 题目不会输入全是点的，运行到这里无非法输入，则数字字母二缺一
            if (!have_letter) {
                printf("Your password needs zi mu.\n");
            } else {
                printf("Your password needs shu zi.\n");
            }
        }
    }
    return 0;
}